/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package allthemoneyflowers.controllers;

import allthemoneyflowers.dao.IAddStore;
import allthemoneyflowers.model.StoreBean;

/**
 *
 * @author Thanos
 */
public class StoreController {
    
    private IAddStore iaddstore;
    
    public StoreController(IAddStore iaddstore)
    {
        this.iaddstore = iaddstore;
    }
    
    public StoreBean checkStoreCredentials(String name, String tel, String address, int tables)
    {
        StoreBean storeBean = new StoreBean(name, tel,address,tables);
         if (storeBean.getTel().equals(tel) && storeBean.getAddress().equals(address))
        {     
            //that store already exists
            return null;
        }
        return storeBean;
        
    }
}
